﻿using System.Collections.Generic;
using System.IO;

namespace TubeFile
{
    public class Handle
    {
        public static List<FileInfo> GetAllFiles(string filePath)
        {
            List<FileInfo> fileInfos = new List<FileInfo>();
            DirectoryInfo root = new DirectoryInfo(filePath);
            foreach (FileInfo f in root.GetFiles())
            {
                fileInfos.Add(f);
            }
            foreach (DirectoryInfo d in root.GetDirectories())
            {
                fileInfos.AddRange(GetAllFiles(d.FullName));
            }
            return fileInfos;
        }



    }
}

